﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using DrSoftsFrame.Servers;

namespace PreeRegisterDAL
{
    public class OrderExeInfoDAL
    {
        /// <summary>
        /// 获取预约执行情况更新信息
        /// 增加同煤版参数  liujia150812
        /// </summary>
        /// <returns></returns>
        public static DataSet GetOrderExeInfo(bool IFTmkyy,string strwhere)
        {
            try
            {
                string sqlstr = "";
                // 增加同煤版参数  liujia150812
                if (IFTmkyy)
                {
                    sqlstr = string.Format(@"select cPreRegisterCode cPreeCode,bImportFlag bRegisteFlag from HMPreRegister where {0}", strwhere);
                }
                else
                {
                    sqlstr = string.Format(@"select cPreeCode,bRegisteFlag from opdregisterpree where {0}", strwhere);
                }
                
                ClinicDb mydb = new ClinicDb();
                DataSet ds = mydb.ExecuteSelect(sqlstr);
                if (ds == null || ds.Tables.Count < 1)
                {
                    return null;
                }
                ds.Tables[0].TableName = "opdregisterpree";
                return ds;

            }
            catch (Exception err)
            {

                throw;
            }
        }
    }
}
